package com.pingan.pastry;


public class Response {
    /**
     * 接口请求状态码 0 代表接口调用成功 1：代表接口调用失败
     **/
    private int code;

    /**
     * 接口请求数据返回
     **/
    private Object data;

    /**
     * 异常信息
     **/
    private String msg;

    public Response() {
    }

    public Response(int code) {
        this.code = code;
    }

    public Response(int code, Object data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Response{" +
                "code=" + code +
                ", data=" + data +
                ", msg='" + msg + '\'' +
                '}';
    }
}
